-
Notifications
You must be signed in to change notification settings - Fork 0
119 improve exploreplants based on feedback #120
Merged
Merged
+1,380
−562
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Move pagination to components/pagination, add page buttons to jump to a specific page, move texts to a "pagination" translation block, add getPageItems tests and update Explore tests and snapshots.
Add and remove plants from My Matches with the same button. Update component and e2e tests and snapshots, and use English consistently in the changed test files.
Move the three filter dropdowns into FilterSelect in components/filterSelect, defined from one FILTERS list. The markup is unchanged, so existing tests and snapshots still pass. Add FilterSelect tests.
Remove the cache warning when a match is removed by setting merge: false on User.matchedPlants, so the Apollo cache replaces the list with the whole list from the backend instead of trying to merge them.
Create index on commonName and _id at server start, reverse _id in Z–A sort to use the index, add index test, and add tests/tsconfig.json so tests are type-checked without changing the build.
Update architecture.md, quality.md, tests.md, README and AI usage for pagination, FilterSelect, the ✿ toggle, the name index and offset pagination. Add tests for the number of results.
…update the documentation accordingly.
…dd tests, update the documentation accordingly and run prettier
6 tasks
alexajah
previously approved these changes
Nov 10, 2026
alexajah
approved these changes
Nov 10, 2026
alexajah
approved these changes
Nov 10, 2026
Sign in
to join this conversation on GitHub.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Changes
Explore Plants
aria-liveregion so screen readers hear it change.merge: falseonUser.matchedPlants).Splitting up
ExplorePlants.tsxPaginationandgetPageItemsincomponents/pagination, with texts in their ownpaginationtranslation block.FilterSelectincomponents/filterSelect, with the filters defined in one list.SortMenuincomponents/sortMenu, with the keyboard navigation.useExploreParamsinhooks/for the URL state. A new search, filter or sort order always goes back to page 1.All three components take already translated texts, so they can be reused on other pages.
Backend
commonNameand_idfor sorting by name, created when the server starts (indexes.ts). Z–A now reverses_idtoo, so both directions use the index.tests/tsconfig.json, so the backend tests are type-checked without changing the build.Tests
getPageItems,FilterSelect,SortMenu,useExploreParamsandindexestests.ExplorePage.test.tsx: number of results, adding and removing matches with the ✿ button, English test data, and updated snapshots.uiMatchAndRemovePlant: removing a plant again from Explore Plants.uiAccessibilitychecks the matched ✿ button.Documentation